package com.itec.learn.java.design.factory.nomethod;

/**
 * @author chenyiqun
 */
public class Main {

    public static void main(String[] args) {
        //申明不同的披萨工厂，注入到PizzaStore中
        //并且需要创建一个抽象工厂AbstractPizzaFactory
        AbstractPizzaFactory nyFactory = new NYPizzaFactory();
        AbstractPizzaFactory chFactory = new ChicagoPizzaFactory();

        PizzaStore pizzaStore = new PizzaStore(nyFactory);
        pizzaStore.orderPizza("greek");

        PizzaStore pizzaStore1 = new PizzaStore(chFactory);
        pizzaStore1.orderPizza("cheese");

    }
}
